Alias for socket.end()
. Allows the socket to be used with using
declarations for automatic resource management.
method
Socket.[Symbol.dispose]
async function processSocket() {
using socket = await Bun.connect({ ... });
socket.write("Data");
// socket.end() is called automatically when exiting the scope
}